package com.changgou.content.feign;

import com.changgou.content.pojo.Content;
import com.changgou.util.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @Author tang.qingbo
 * @Date 2020/8/27 0:24
 * @Version 1.0
 */
@FeignClient(name = "content")
@RequestMapping("/content")
public interface ContentFeign {

    /**
     * 根据分类id查询广告
     */
    @GetMapping("/list/category/{id}")
    Result<List<Content>> findByCategoryId(@PathVariable("id") Long categoryId);
}
